import less from "./less-browser.js";
import less1 from "../dist/less-browser.umd.js";
console.log("less-browser", less, less1);
let css = `
@bg: blue;
@scope (.foo){ 
  .green { 
    background-color: green; 
  }
}
.a[scope-target] {
  --c1: #ff0;
  .b {
    color: red;
  }
  &:hover {
    background-color: @bg;
    color: var(--c1);
  }
}`;
less.render(
  css,
  {},
  (e, result) =>
    console.log("css转换测试", result, e) ||
    (result &&
      (document.querySelector("pre").innerHTML = `
      <style>${result.css}</style>
    <div class="a" scope-target> aaaa
      <div class="b">bbbbbb</div>
    </div>
      <fieldset><legend>原始css</legend>${css}</fieldset>
      <fieldset><legend>编译后的css</legend>${result.css}</fieldset>`))
);
